package com.spi.soconversion.base.definition;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * A flat object for COFI order lines
 * 
 * @author XSPID41
 *
 */
public class COFIOrderLine {

	private Integer serialNumber;
	private Integer headerID;
	private Long orderNumber;
	private Timestamp orderDate;
	private String partyId;
	private Long lineId;
	private Integer lineTypeId;
	private Integer lineNumber;
	private String lineCategoryCode;
	private Long headerShipToKey;
	private Long headerBillToKey;
	private Long lineShipToKey;
	private Long lineBillToKey;
	private String headerAttribute3;
	private String headerAttribute5;
	private String empBatchNum;
	private String taxExemptType;
	private String taxExemptCertificate;
	private Integer headerInvoiceToOrgId;
	private Integer headerShipToOrgId;
	private Integer orgCode;
	private Integer shipNode;
	private BigDecimal unitSellingPrice;
	private BigDecimal unitListPrice;
	private Integer pricingQuantity;
	private Integer orderedQuantity;
	private Timestamp scheduleShipDate;
	private Timestamp promiseDate;
	private String shippingMethodCode;
	private Integer linesShipFromOrgId;
	private Integer linesShipToOrgId;
	private String subInventory;
	private BigDecimal taxValue;
	private String giftRegLineNumber;
	private String giftRegNumber;
	private String lineAttribute3;
	private String lineRetAttribute1;
	private Long lineRetAttribute2;
	private String lineRetAttribute3;
	private Long lineRetAttribute4;
	private Long lineRetAttribute5;
	private String lineAttribute7;
	private String lineStatus;
	private Integer serviceRefLineId;
	private Integer inventoryItemId;
	private BigDecimal unitWeight;
	private String weightUOMCode;
	private String itemSKU;
	private String itemType;
	private String itemDescription;
	private String itemCatalogGroupId;
	private String itemCategory;
	private String primaryUnitOfMeasure;
	private Integer locationId;
	private String swingByStore;
	private Integer cashReceiptId;
	private Timestamp receiptDate;
	private String posTxnNo;
	private String posRegNo;
	private String posStoreNo;
	private String taxProvince;
	private BigDecimal gstTax;
	private BigDecimal gstPercent;
	private BigDecimal pstTax;
	private BigDecimal pstPercent;
	private BigDecimal hstTax;
	private BigDecimal hstPercent;
	private String releaseStatus;
	private Integer quantityShipped;
	private Integer quantityReceived;
	private boolean isExchangeLine = false;
	private boolean isReturnLine = false;
	private boolean isReturned = false;
	private COFIOrderLine returnLine;
	
	private boolean isDeliveryLineExists = false;
	private boolean isFurnitureWTYLine = false;
	private boolean isNonFurnitureWTYLine = false;

	public Integer getSerialNumber() {
		return serialNumber;
	}
	public void setSerialNumber(Integer serialNumber) {
		this.serialNumber = serialNumber;
	}
	public Integer getHeaderID() {
		return headerID;
	}
	public void setHeaderID(Integer headerID) {
		this.headerID = headerID;
	}
	public Long getOrderNumber() {
		return orderNumber;
	}
	public void setOrderNumber(Long orderNumber) {
		this.orderNumber = orderNumber;
	}
	public Timestamp getOrderDate() {
		return orderDate;
	}
	public void setOrderDate(Timestamp orderDate) {
		this.orderDate = orderDate;
	}
	public String getPartyId() {
		return partyId;
	}
	public void setPartyId(String partyId) {
		this.partyId = partyId;
	}
	public Long getLineId() {
		return lineId;
	}
	public void setLineId(Long lineId) {
		this.lineId = lineId;
	}
	public Integer getLineTypeId() {
		return lineTypeId;
	}
	public void setLineTypeId(Integer lineTypeId) {
		this.lineTypeId = lineTypeId;
	}
	public Integer getLineNumber() {
		return lineNumber;
	}
	public void setLineNumber(Integer lineNumber) {
		this.lineNumber = lineNumber;
	}
	public String getLineCategoryCode() {
		return lineCategoryCode;
	}
	public void setLineCategoryCode(String lineCategoryCode) {
		this.lineCategoryCode = lineCategoryCode;
	}
	public String getHeaderAttribute3() {
		return headerAttribute3;
	}
	public void setHeaderAttribute3(String headerAttribute3) {
		this.headerAttribute3 = headerAttribute3;
	}
	public String getHeaderAttribute5() {
		return headerAttribute5;
	}
	public void setHeaderAttribute5(String headerAttribute5) {
		this.headerAttribute5 = headerAttribute5;
	}
	public String getEmpBatchNum() {
		return empBatchNum;
	}
	public void setEmpBatchNum(String empBatchNum) {
		this.empBatchNum = empBatchNum;
	}
	public String getTaxExemptType() {
		return taxExemptType;
	}
	public void setTaxExemptType(String taxExemptType) {
		this.taxExemptType = taxExemptType;
	}
	public String getTaxExemptCertificate() {
		return taxExemptCertificate;
	}
	public void setTaxExemptCertificate(String taxExemptCertificate) {
		this.taxExemptCertificate = taxExemptCertificate;
	}
	public Integer getHeaderInvoiceToOrgId() {
		return headerInvoiceToOrgId;
	}
	public void setHeaderInvoiceToOrgId(Integer headerInvoiceToOrgId) {
		this.headerInvoiceToOrgId = headerInvoiceToOrgId;
	}
	public Integer getHeaderShipToOrgId() {
		return headerShipToOrgId;
	}
	public void setHeaderShipToOrgId(Integer headerShipToOrgId) {
		this.headerShipToOrgId = headerShipToOrgId;
	}
	public Integer getOrgCode() {
		return orgCode;
	}
	public void setOrgCode(Integer orgCode) {
		this.orgCode = orgCode;
	}
	public Integer getShipNode() {
		return shipNode;
	}
	public void setShipNode(Integer shipNode) {
		this.shipNode = shipNode;
	}
	public BigDecimal getUnitSellingPrice() {
		return unitSellingPrice;
	}
	public void setUnitSellingPrice(BigDecimal unitSellingPrice) {
		this.unitSellingPrice = unitSellingPrice;
	}
	public BigDecimal getUnitListPrice() {
		return unitListPrice;
	}
	public void setUnitListPrice(BigDecimal unitListPrice) {
		this.unitListPrice = unitListPrice;
	}
	public Integer getPricingQuantity() {
		return pricingQuantity;
	}
	public void setPricingQuantity(Integer pricingQuantity) {
		this.pricingQuantity = pricingQuantity;
	}
	public Integer getOrderedQuantity() {
		return orderedQuantity;
	}
	public void setOrderedQuantity(Integer orderedQuantity) {
		this.orderedQuantity = orderedQuantity;
	}
	public Timestamp getScheduleShipDate() {
		return scheduleShipDate;
	}
	public void setScheduleShipDate(Timestamp scheduleShipDate) {
		this.scheduleShipDate = scheduleShipDate;
	}
	public Timestamp getPromiseDate() {
		return promiseDate;
	}
	public void setPromiseDate(Timestamp promiseDate) {
		this.promiseDate = promiseDate;
	}
	public String getShippingMethodCode() {
		return shippingMethodCode;
	}
	public void setShippingMethodCode(String shippingMethodCode) {
		this.shippingMethodCode = shippingMethodCode;
	}
	public Integer getLinesShipFromOrgId() {
		return linesShipFromOrgId;
	}
	public void setLinesShipFromOrgId(Integer linesShipFromOrgId) {
		this.linesShipFromOrgId = linesShipFromOrgId;
	}
	public Integer getLinesShipToOrgId() {
		return linesShipToOrgId;
	}
	public void setLinesShipToOrgId(Integer linesShipToOrgId) {
		this.linesShipToOrgId = linesShipToOrgId;
	}
	public String getSubInventory() {
		return subInventory;
	}
	public void setSubInventory(String subInventory) {
		this.subInventory = subInventory;
	}
	public BigDecimal getTaxValue() {
		return taxValue;
	}
	public void setTaxValue(BigDecimal taxValue) {
		this.taxValue = taxValue;
	}
	public String getGiftRegLineNumber() {
		return giftRegLineNumber;
	}
	public void setGiftRegLineNumber(String giftRegLineNumber) {
		this.giftRegLineNumber = giftRegLineNumber;
	}
	public String getGiftRegNumber() {
		return giftRegNumber;
	}
	public void setGiftRegNumber(String giftRegNumber) {
		this.giftRegNumber = giftRegNumber;
	}
	public String getLineAttribute3() {
		return lineAttribute3;
	}
	public void setLineAttribute3(String lineAttribute3) {
		this.lineAttribute3 = lineAttribute3;
	}
	public String getLineRetAttribute1() {
		return lineRetAttribute1;
	}
	public void setLineRetAttribute1(String lineRetAttribute1) {
		this.lineRetAttribute1 = lineRetAttribute1;
	}
	public Long getLineRetAttribute2() {
		return lineRetAttribute2;
	}
	public void setLineRetAttribute2(Long lineRetAttribute2) {
		this.lineRetAttribute2 = lineRetAttribute2;
	}
	public String getLineRetAttribute3() {
		return lineRetAttribute3;
	}
	public void setLineRetAttribute3(String lineRetAttribute3) {
		this.lineRetAttribute3 = lineRetAttribute3;
	}
	public Long getLineRetAttribute4() {
		return lineRetAttribute4;
	}
	public void setLineRetAttribute4(Long lineRetAttribute4) {
		this.lineRetAttribute4 = lineRetAttribute4;
	}
	public Long getLineRetAttribute5() {
		return lineRetAttribute5;
	}
	public void setLineRetAttribute5(Long lineRetAttribute5) {
		this.lineRetAttribute5 = lineRetAttribute5;
	}
	public String getLineAttribute7() {
		return lineAttribute7;
	}
	public void setLineAttribute7(String lineAttribute7) {
		this.lineAttribute7 = lineAttribute7;
	}
	public String getLineStatus() {
		return lineStatus;
	}
	public void setLineStatus(String lineStatus) {
		this.lineStatus = lineStatus;
	}
	public Integer getServiceRefLineId() {
		return serviceRefLineId;
	}
	public void setServiceRefLineId(Integer serviceRefLineId) {
		this.serviceRefLineId = serviceRefLineId;
	}
	public Integer getInventoryItemId() {
		return inventoryItemId;
	}
	public void setInventoryItemId(Integer inventoryItemId) {
		this.inventoryItemId = inventoryItemId;
	}
	public BigDecimal getUnitWeight() {
		return unitWeight;
	}
	public void setUnitWeight(BigDecimal unitWeight) {
		this.unitWeight = unitWeight;
	}
	public String getWeightUOMCode() {
		return weightUOMCode;
	}
	public void setWeightUOMCode(String weightUOMCode) {
		this.weightUOMCode = weightUOMCode;
	}
	public String getItemSKU() {
		return itemSKU;
	}
	public void setItemSKU(String itemSKU) {
		this.itemSKU = itemSKU;
	}
	public String getItemType() {
		return itemType;
	}
	public void setItemType(String itemType) {
		this.itemType = itemType;
	}
	public String getItemDescription() {
		return itemDescription;
	}
	public void setItemDescription(String itemDescription) {
		this.itemDescription = itemDescription;
	}
	public String getItemCatalogGroupId() {
		return itemCatalogGroupId;
	}
	public void setItemCatalogGroupId(String itemCatalogGroupId) {
		this.itemCatalogGroupId = itemCatalogGroupId;
	}
	public String getItemCategory() {
		return itemCategory;
	}
	public void setItemCategory(String itemCategory) {
		this.itemCategory = itemCategory;
	}
	public String getPrimaryUnitOfMeasure() {
		return primaryUnitOfMeasure;
	}
	public void setPrimaryUnitOfMeasure(String primaryUnitOfMeasure) {
		this.primaryUnitOfMeasure = primaryUnitOfMeasure;
	}
	public Integer getLocationId() {
		return locationId;
	}
	public void setLocationId(Integer locationId) {
		this.locationId = locationId;
	}
	public String getSwingByStore() {
		return swingByStore;
	}
	public void setSwingByStore(String swingByStore) {
		this.swingByStore = swingByStore;
	}
	public Integer getCashReceiptId() {
		return cashReceiptId;
	}
	public void setCashReceiptId(Integer cashReceiptId) {
		this.cashReceiptId = cashReceiptId;
	}
	public Timestamp getReceiptDate() {
		return receiptDate;
	}
	public void setReceiptDate(Timestamp receiptDate) {
		this.receiptDate = receiptDate;
	}
	public String getPosTxnNo() {
		return posTxnNo;
	}
	public void setPosTxnNo(String posTxnNo) {
		this.posTxnNo = posTxnNo;
	}
	public String getPosRegNo() {
		return posRegNo;
	}
	public void setPosRegNo(String posRegNo) {
		this.posRegNo = posRegNo;
	}
	public String getPosStoreNo() {
		return posStoreNo;
	}
	public void setPosStoreNo(String posStoreNo) {
		this.posStoreNo = posStoreNo;
	}
	public String getTaxProvince() {
		return taxProvince;
	}
	public void setTaxProvince(String taxProvince) {
		this.taxProvince = taxProvince;
	}
	public BigDecimal getGstTax() {
		return gstTax;
	}
	public void setGstTax(BigDecimal gstTax) {
		this.gstTax = gstTax;
	}
	public BigDecimal getGstPercent() {
		return gstPercent;
	}
	public void setGstPercent(BigDecimal gstPercent) {
		this.gstPercent = gstPercent;
	}
	public BigDecimal getPstTax() {
		return pstTax;
	}
	public void setPstTax(BigDecimal pstTax) {
		this.pstTax = pstTax;
	}
	public BigDecimal getPstPercent() {
		return pstPercent;
	}
	public void setPstPercent(BigDecimal pstPercent) {
		this.pstPercent = pstPercent;
	}
	public BigDecimal getHstTax() {
		return hstTax;
	}
	public void setHstTax(BigDecimal hstTax) {
		this.hstTax = hstTax;
	}
	public BigDecimal getHstPercent() {
		return hstPercent;
	}
	public void setHstPercent(BigDecimal hstPercent) {
		this.hstPercent = hstPercent;
	}
	public String getReleaseStatus() {
		return releaseStatus;
	}
	public void setReleaseStatus(String releaseStatus) {
		this.releaseStatus = releaseStatus;
	}
	public boolean isReturned() {
		return isReturned;
	}
	public void setReturned(boolean isReturned) {
		this.isReturned = isReturned;
	}
	public COFIOrderLine getReturnLine() {
		return returnLine;
	}
	public void setReturnLine(COFIOrderLine returnLine) {
		this.returnLine = returnLine;
	}		
	public Integer getQuantityShipped() {
		return quantityShipped;
	}
	public void setQuantityShipped(Integer quantityShipped) {
		this.quantityShipped = quantityShipped;
	}
	public Integer getQuantityReceived() {
		return quantityReceived;
	}
	public void setQuantityReceived(Integer quantityReceived) {
		this.quantityReceived = quantityReceived;
	}	
	public Long getHeaderShipToKey() {
		return headerShipToKey;
	}
	public void setHeaderShipToKey(Long headerShipToKey) {
		this.headerShipToKey = headerShipToKey;
	}
	public Long getHeaderBillToKey() {
		return headerBillToKey;
	}
	public void setHeaderBillToKey(Long headerBillToKey) {
		this.headerBillToKey = headerBillToKey;
	}
	public Long getLineShipToKey() {
		return lineShipToKey;
	}
	public void setLineShipToKey(Long lineShipToKey) {
		this.lineShipToKey = lineShipToKey;
	}
	public Long getLineBillToKey() {
		return lineBillToKey;
	}
	public void setLineBillToKey(Long lineBillToKey) {
		this.lineBillToKey = lineBillToKey;
	}
	
	public boolean isReturnLine() {
		return isReturnLine;
	}
	public void setReturnLine(boolean isReturnLine) {
		this.isReturnLine = isReturnLine;
	}
	
	public boolean isExchangeLine() {
		return isExchangeLine;
	}
	public void setExchangeLine(boolean isExchangeLine) {
		this.isExchangeLine = isExchangeLine;
	}

	public boolean isDeliveryLineExists() {
		return isDeliveryLineExists;
	}
	public void setDeliveryLineExists(boolean isDeliveryLineExists) {
		this.isDeliveryLineExists = isDeliveryLineExists;
	}
	
	public boolean isFurnitureWTYLine() {
		return isFurnitureWTYLine;
	}
	public void setFurnitureWTYLine(boolean isFurnitureWTYLine) {
		this.isFurnitureWTYLine = isFurnitureWTYLine;
	}
	public boolean isNonFurnitureWTYLine() {
		return isNonFurnitureWTYLine;
	}
	public void setNonFurnitureWTYLine(boolean isNonFurnitureWTYLine) {
		this.isNonFurnitureWTYLine = isNonFurnitureWTYLine;
	}
	
	@Override
	public int hashCode() {
		final int prime = 35;
		int result = 1;
		result = prime * result + ((lineId == null) ? 0 : lineId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		COFIOrderLine other = (COFIOrderLine) obj;
		if (lineId == null) {
			if (other.lineId != null)
				return false;
		} else if (!lineId.equals(other.lineId))
			return false;
		
		return true;
	}
	
	@Override
	public String toString() {
        StringBuffer s = new StringBuffer();
        s.append("Line [" + getLineNumber() + ", " + getLineId() + ", " + getLineCategoryCode() + ", " + getItemType() + ", " + getLineTypeId() + ", " +  getLineStatus() + ", " + getItemDescription() + ", " + getReleaseStatus() + "]");
        return s.toString();
	}    				
}
